import copy
import functools


@functools.total_ordering
class MyClass:

    def __init__(self, name):
        self.name = name

    def __eq__(self, other):
        return self.name == other.name

    def __gt__(self, other):
        return self.name > other.name


a = MyClass('a')
my_list = [a]
dup = copy.copy(my_list)

print('\t\tmy_list: ', my_list)
print('\t\t    dup: ', dup)
print('\t\tdup is my_list: ', (dup is my_list))
print('\t\tdup == mu_list: ', (dup == my_list))
print('\t\tdup[0] is my_list[0]: ', (dup[0] is my_list[0]))
print('\t\tdup[0] == my_list[0]: ', (dup[0] == my_list[0]))
